package com.excilys.model;

import javax.persistence.Entity;

import org.joda.time.DateTime;

/**
 * POJO Card transaction. Can be withdraw.
 * 
 * @author excilys dev : YA
 * @version 1.0
 * 
 */
@SuppressWarnings("serial")
@Entity
public class TransactionCard extends Transaction {

	private String cardLabel;

	// ------------------------------------------------------------
	// ------------------------------------------------------------
	// ------------------------------------------------------------

	public TransactionCard() {
		this.transactionType = TransactionType.CARD;
	}

	public TransactionCard(double transactionAmount, DateTime transactionDate, Account transactionAccount, String cardLabel) {
		super(transactionAmount, transactionDate, transactionAccount);
		this.cardLabel = cardLabel;
		this.transactionType = TransactionType.CARD;
	}

	// ------------------------------------------------------------
	// ------------------------------------------------------------
	// ------------------------------------------------------------

	@Override
	public String printLabel() {
		return this.getLabel();
	}

	// ------------------------------------------------------------
	// ------------------------------------------------------------
	// ------------------------------------------------------------

	public String getLabel() {
		return cardLabel;
	}

	public void setLabel(String cardLabel) {
		this.cardLabel = cardLabel;
	}

}
